﻿<Application
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	x:Class="Mooville.QUno.Prototype.App" mc:Ignorable="d">
	<Application.Resources>
		<!-- Resources scoped at the Application level should be defined here. -->
		<ResourceDictionary>
			<ResourceDictionary.MergedDictionaries>
				<ResourceDictionary Source="/Microsoft.Expression.Prototyping.SketchControls;Component/ScrollViewerStyles.xaml"/>
				<ResourceDictionary Source="/Mooville.QUno.Prototype.Screens;Component/SketchStyles.xaml"/>
			</ResourceDictionary.MergedDictionaries>
			<DataTemplate x:Key="PlayerTemplate">
				<Grid>
					<Grid.ColumnDefinitions>
						<ColumnDefinition Width="0.828*"/>
						<ColumnDefinition Width="0.172*"/>
					</Grid.ColumnDefinitions>
					<TextBlock Margin="8" Text="{Binding Name, Mode=Default}" TextWrapping="Wrap" d:LayoutOverrides="Width, Height"/>
					<CheckBox Content="Human?" Grid.Column="1" d:LayoutOverrides="Width, Height" Margin="8" IsChecked="{Binding IsHuman, Mode=Default}"/>
				</Grid>
			</DataTemplate>
			<DataTemplate x:Key="CardTemplate">
				<Border x:Name="border" BorderBrush="Black" BorderThickness="2" CornerRadius="3" Padding="16">
					<Grid>
						<Grid.RowDefinitions>
							<RowDefinition Height="0.5*"/>
							<RowDefinition Height="0.5*"/>
						</Grid.RowDefinitions>
						<TextBlock x:Name="textColor" Text="{Binding Color, Mode=Default}" TextWrapping="Wrap"/>
						<TextBlock x:Name="textValue" Grid.Row="1" Text="{Binding Value, Mode=Default}" TextWrapping="Wrap"/>
					</Grid>
				</Border>
				<DataTemplate.Triggers>
					<Trigger Property="Text" Value="1" SourceName="textColor">
						<Setter Property="Background" TargetName="border" Value="Red"/>
					</Trigger>
					<Trigger Property="Text" Value="2" SourceName="textColor">
						<Setter Property="Background" TargetName="border" Value="Blue"/>
					</Trigger>
					<Trigger Property="Text" Value="3" SourceName="textColor">
						<Setter Property="Background" TargetName="border" Value="Yellow"/>
					</Trigger>
					<Trigger Property="Text" Value="4" SourceName="textColor">
						<Setter Property="Background" TargetName="border" Value="Lime"/>
					</Trigger>
					<Trigger Property="Text" Value="0" SourceName="textColor">
						<Setter Property="Background" TargetName="border" Value="Black"/>
						<Setter Property="Foreground" TargetName="textColor" Value="White"/>
						<Setter Property="Foreground" TargetName="textValue" Value="White"/>
					</Trigger>
				</DataTemplate.Triggers>
			</DataTemplate>
			<ItemsPanelTemplate x:Key="CardPanelTemplate">
				<WrapPanel IsItemsHost="True"/>
			</ItemsPanelTemplate>
		</ResourceDictionary>
	</Application.Resources>
</Application>